//
//  UIBarButtonItem+Extension.h
//  BasicFramework
//
//  Created by Rainy on 16/10/26.
//  Copyright © 2016年 Rainy. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger,BarBtnItemStyle) {
    LeftBarBtnItemStyle          = 0,
    RightBarBtnItemStyle         = 1
};

@interface UIBarButtonItem (Item)

//标题
+(UIBarButtonItem *)OnCreateBarBtnItemName:(NSString *)ItemName BarBtnstyle:(BarBtnItemStyle)ItemStyle Btntag:(int)tag target:(id)target action:(SEL)action ;
//图片
+(UIBarButtonItem *)OnCreateBarBtnItemImage:(NSString *)BtnItemImage BarBtnstyle:(BarBtnItemStyle)ItemStyle Btntag:(int)tag target:(id)target action:(SEL)action;
//图片和标题
+(UIBarButtonItem *)OnCreateBarBtnItemImage:(NSString *)BtnItemImage ItemName:(NSString *)ItemName BarBtnstyle:(BarBtnItemStyle)ItemStyle Btntag:(int)tag target:(id)target action:(SEL)action;

+ (UIBarButtonItem *)OnCreateBarBtnWithImage:(NSString*)BtnItemImage highImage:(NSString *)HighImage  BarBtnstyle:(BarBtnItemStyle)ItemStyle target:(id)target action:(SEL)action;

@end




typedef void(^BlockAction)(void);

@interface UIBarButtonItem (Hentai)

- (instancetype)initWithImage:(UIImage *)image style:(UIBarButtonItemStyle)style blockAction:(BlockAction)blockAction;
- (instancetype)initWithImage:(UIImage *)image landscapeImagePhone:(UIImage *)landscapeImagePhone style:(UIBarButtonItemStyle)style blockAction:(BlockAction)blockAction;
- (instancetype)initWithTitle:(NSString *)title style:(UIBarButtonItemStyle)style blockAction:(BlockAction)blockAction;
- (instancetype)initWithBarButtonSystemItem:(UIBarButtonSystemItem)systemItem blockAction:(BlockAction)blockAction;

@end

@interface UIBarButtonItem (modify)

/**《 设置大小 》**/
@property(nonatomic,strong)UIFont*font;
/**《 设置颜色 》**/
@property(nonatomic,strong)UIColor*color;
/**《 显示添加删除线 》**/
@property(nonatomic,assign)BOOL deleteLint;
/**《 添加下划线 》**/
@property(nonatomic,assign)BOOL underline;
/**《 背景颜色 》**/
@property(nonatomic,strong)UIColor*backColor;

@end
